package com.party.core.model.mall;

import com.party.core.model.BaseModel;

/**
 * Created by huangwuming on 2018/3/27/027.
 */
public class MallGoodsResources extends BaseModel {
    private String url;
    private String goodsId;
    private int type;
    private int sort;
    private String memberId;

    public static int TYPE_PIC = 1;
    public static int TYPE_VIDEO = 2;

    public MallGoodsResources() {
    }

    public MallGoodsResources(String url, String goodsId, int type) {
        this.url = url;
        this.goodsId = goodsId;
        this.type = type;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;

        MallGoodsResources that = (MallGoodsResources) o;

        if (type != that.type) return false;
        if (sort != that.sort) return false;
        if (url != null ? !url.equals(that.url) : that.url != null) return false;
        if (goodsId != null ? !goodsId.equals(that.goodsId) : that.goodsId != null) return false;
        return memberId != null ? memberId.equals(that.memberId) : that.memberId == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (url != null ? url.hashCode() : 0);
        result = 31 * result + (goodsId != null ? goodsId.hashCode() : 0);
        result = 31 * result + type;
        result = 31 * result + sort;
        result = 31 * result + (memberId != null ? memberId.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "MallGoodsResources{" +
                "url='" + url + '\'' +
                ", goodsId='" + goodsId + '\'' +
                ", type=" + type +
                ", sort=" + sort +
                ", memberId='" + memberId + '\'' +
                '}';
    }
}
